package cc.rengu.redp.flowable.bizmodel.calculate;

public class FieldAlgHelper {
    public static class AlgType {
        public final static String UniqKeyGenerator = "1";
        public final static String SpecifyFields = "2";
        public final static String FixedValue = "3";
        public final static String PluginCal = "4";
    }

    public static final String DEFAULT = "DEFAULT";

    public static FieldAlgorithm get(String algType, String params) {
        switch (algType) {
            case AlgType.UniqKeyGenerator:
                return new UniqKeyGenerator(params);
            case AlgType.SpecifyFields:
                return new SpecifyFields(params);
            case AlgType.FixedValue:
                return new FixedValue(params);
            case AlgType.PluginCal:
                return new PluginCal(params);
        }

        return null;
    }
}
